<?php
require('conn.php');
require('functions.php');
require('session.php');
//print_r($userdata);

?>

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
<title>转客排行</title>
<meta name="keywords" content="<?php echo $config['sitename']?>排行榜,微转排行,微转联盟" />
<meta name="description" content="在这里可以实时查看最新的<?php echo $config['sitename']?>排名。">
<link href="<?php echo $site?>/static/all.css" type="text/css" rel="stylesheet" media="all">
<style>
td{height:40px;line-height:40px;font-size:1.3em;}
.red{background-color: #f0585c;color: white;}
.green{background-color: #58f09b;color: white;}
.blue{background-color: #f74545;color: white;}
.darkblue{background-color: #ec3a3a;color: white;}
.w33{width: 33.3%;}
.br1{border-right:1px solid white;}
</style>
</head>

<body class="mhome">
<table width="100%" border="0" cellspacing="0" cellpadding="2">
  <tr>
    <td class="w33 darkblue br1" align="center">排名</td>
    <td class="w33 darkblue br1" align="center">收益</td>
    <td class="w33 darkblue" align="center">用户</td>
  </tr>
<?php
$rows=$mysql->query("select * from `userdata` order by -`money` limit 0,10");
for($i=0;$i<=9;$i++){
$phone = substr_replace($rows[$i]['phone'],'****',3,4);
$ii=$i+1;
print <<<tr
    <tr>
    <td class="w33" align="center">{$ii}</td>
    <td class="w33" align="center">{$rows[$i]['money']}</td>
    <td class="w33" align="center">{$phone}</td>
  </tr>
tr;
	
}
?>
</table>
<?php
@session_start();
if(isset($_SESSION)){
  $_uid=$_SESSION['userdata']['id'];
}else{
  $_uid=guolv($_GET['uid']);
}
?>
<br><br><br><br>
<div class="positionFooter">
  <ul style="height:100%;">
    <li><a class="a4" href="<?php echo $site?>/ucenter.php"></a></li>   
    <li><a class="a2" href="<?php echo $site?>/list.php?uid=<?php echo $_uid?>"></a></li>
    <li><a class="a3" href="<?php echo $site?>/news.php?type=1"></a></li>
  </ul>
</div>

<?php
$mysql->__destruct();
$mysql->close();
?>
</body>
</html>
